﻿using System;
using System.Collections.Generic;
using System.Text;

namespace KCLIMTrading.Mgmt
{
  public class Invoice
  {
    #region Variable
    private int number;
    private decimal total;
    #endregion

    #region Properties
    /// <summary>
    /// Sets or gets invoice number.
    /// </summary>
    public int Number { get {return this.number;} set {this.number = value;} }
    private List<Item> item;
    /// <summary>
    /// Gets or sets order item for invoice.
    /// </summary>
    public List<Item> Items { get { return this.item; } set { this.item = value; } }

    /// <summary>
    /// Gets total amount of the invoice.
    /// </summary>
    public decimal Total
    {
      get
      {
        foreach (Item POitem in Items)
          this.total += POitem.NetValue;
        return this.total;
      }
    }

    #endregion

    public Invoice()
    {
    }
  }
}